package com.xu.sso.core.utils;

import org.apache.commons.codec.digest.DigestUtils;

import java.util.UUID;

public class LoginUtil {

    public static String encodePassword(String username, String password) {
        String pwd = password + "{" + username + "}";
        return DigestUtils.md5Hex(pwd);
    }

    public static String createToken() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }


}
